<?php
    $this->load->view('wx/public/header.html', [
        'time' => time(),
        'index' => 4,
        'css' => [
            'assets/wx/css/center.css',
        ]
    ]);
?>

<body class="center" ng-controller="wx-center-ticket-index-controller">

<section class="aui-content">
    <div class="aui-tab gu-tab" id="tab">
        <div class="aui-tab-item" ng-click="getLists('nouse')" ng-class="{'aui-active': nowType == 'nouse'}" ng-bind="'未使用('+ summary.nouse +')'"></div>
        <div class="aui-tab-item" ng-click="getLists('used')" ng-class="{'aui-active': nowType == 'used'}" ng-bind="'使用记录('+ summary.used +')'"></div>
        <div class="aui-tab-item" ng-click="getLists('expires')" ng-class="{'aui-active': nowType == 'expires'}" ng-bind="'已过期('+ summary.expires +')'"></div>
    </div>

    <!--提示条-->
    <div class="aui-tips aui-margin-b-15" id="tips-1" ng-show="tips">
        <i class="aui-iconfont aui-icon-info"></i>
        <a href="/center/getTicket" class="aui-tips-title">点击领取更多优惠券</a>
        <i class="aui-iconfont aui-icon-close" ng-click="tips = false"></i>
    </div>

    <div class="gu-ticket-center-epy" ng-hide="lists.length > 0">
        <p class="aui-text-center">没有优惠券</p>
    </div>

    <div class="aui-content aui-margin-b-15">
        <ul class="gu-ticket aui-list aui-media-list aui-padded-l-10 aui-padded-r-10 aui-padded-t-10 aui-padded-b-10">
            <li ng-repeat="(index, l) in lists" class="aui-list-item aui-margin-b-10 gu-ticket-item" style="height: auto;">
                <div class="aui-media-list-item-inner">
                    <div class="gu-ticket-icon"
                         ng-class="{'gu-ticket-nouse': nowType == 'nouse', 'gu-ticket-used': nowType == 'used', 'gu-ticket-exp': nowType == 'expires'}"></div>
                    <div class="aui-list-item-media">
                        <p class="gu-price"><strong ng-bind="l.amount_format + '元'"></strong></p>
                        <p class="gu-desc" ng-bind="'满' + l.limit_amount_format + '元可用'"></p>
                    </div>
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-text">
                            <div class="aui-list-item-title" ng-bind="l.name"></div>
                        </div>
                        <div class="aui-list-item-text">
                            <div class="aui-info-item" ng-bind="l.time_start + ' 至 ' + l.time_end "></div>
                        </div>
                        <div class="aui-info aui-margin-t-5 aui-border-t" style="padding:0; line-height: 30px;" ng-show="!l.detail">使用说明</div>
                    </div>
                    <div class="gu-show-ticket-detail" ng-class="{'open': !l.detail, 'close': l.detail}" ng-click="l.detail = !l.detail"></div>
                </div>
                <div ng-show="l.detail" class="gu-ticket-des-box">
                    <h3>使用说明</h3>
                    <div class="gu-ticket-des-txt" ng-bind-html="l.description">
                    </div>
                </div>
            </li>
        </ul>
    </div>

</section>

<?php
    $this->load->view('wx/public/footer.html', [
        'js' => [
            'assets/wx/js/center/ticket/index.js'
        ]
    ]);
?>

